/**
 * @param {object} serviceApi - 接口API
 */

let serviceApi = {};
function importAll(serviceArr) {
    
    serviceArr.keys().forEach(key => {
        
        var apiName = key.replace(/.*\/([a-zA-Z]*)[a-zA-Z\.]*/gi,"$1");
        var obj = {}
        obj[apiName] = {};
        Object.assign(obj[apiName], serviceArr(key).default);
        Object.assign(serviceApi, obj);
        console.log(serviceApi)
    });
}
  
importAll(require.context(".", true, /\.service\.js/));

export default serviceApi
